<%@page import="ibusplus.com.reportRequest.clases.ReportExport"%>
<%
            String domain = (String) request.getParameter("domain");
            String data = (String) request.getParameter("data");
            String clientFile = (String) request.getParameter("clientfile");
            String clientFolder = (String) request.getParameter("clientfolder");
            String fileType = (String) request.getParameter("filetype");
            String xpath = (String) request.getParameter("xpath");

            System.out.println("--------INICIO PARAMETROS DESDE LA URL---------");
            System.out.println("Domain:\t" + domain);
            System.out.println("Data:\t" + data);
            System.out.println("ClienteFile:\t" + clientFile);
            System.out.println("ClienteFolder:\t" + clientFolder);
            System.out.println("FileType:\t" + fileType);
            System.out.println("xpath\t" + xpath);
            System.out.println("--------FIN PARAMETROS DESDE LA URL------------");
            if (domain == null || data == null || clientFile == null || clientFolder == null || fileType == null || xpath == null) {
                response.sendRedirect(request.getContextPath() + "/faces/error.jsp?errorMessage=Missing parameters.");
            } else {
                ReportExport re = new ReportExport();
                re.setXml_uri("http://" + domain + data);
                re.setClientFolder(clientFolder);
                re.setReport(clientFile);
                re.setFormat(fileType.toLowerCase());
                re.setXpath(xpath);
                response.sendRedirect(re.getURLReport());
            }
%>